package com.eonmind.common.provider.entity.ai;

import com.eonmind.common.contract.enums.DelEnum;
import com.eonmind.common.contract.enums.ai.AiVideoStatusEnum;
import com.eonmind.common.contract.timer.Timer;
import com.mongoplus.annotation.ID;
import com.mongoplus.annotation.collection.CollectionName;
import com.mongoplus.annotation.index.MongoIndex;
import com.mongoplus.enums.IdTypeEnum;
import lombok.Data;
import lombok.ToString;
import lombok.experimental.FieldNameConstants;

/**
 * AI视频任务
 *
 * @author Xujie
 * @since 2025/5/5 11:34
 **/
@Data
@CollectionName("aiVideo")
@FieldNameConstants
@ToString
public class AiVideo {
    /**
     * 视频任务id
     */
    @ID(type = IdTypeEnum.AUTO)
    private Long id;

    /**
     * 用户ID
     */
    @MongoIndex
    private Long userId = 0L;

    /**
     * 模型ID
     */
    @MongoIndex
    private Integer platformId = 0;

    /**
     * 第三方返回的任务ID
     */
    private String taskId = "";


    /**
     * 视频地址
     */
    private String videoUrl = "";

    /**
     * 封面地址
     */
    private String poster = "";

    /**
     * 视频任务Prompt
     */
    private String prompt = "";

    /**
     * 视频任务Negative Prompt
     */
    private String negativePrompt = "";

    /**
     * 视频任务模板ID
     */
    private String templateId = "";

    /**
     * 视频任务比例
     */
    private String radio = "16:9";

    /**
     * 模型
     */
    private String model = "";

    /**
     * 视频任务状态
     */
    @MongoIndex
    private Integer status = AiVideoStatusEnum.PENDING_GENERATION.getCode();

    /**
     * 创建时间
     */
    private Long createTime = Timer.currentTimestamp();

    /**
     * 更新时间
     */
    private Long updateTime = Timer.currentTimestamp();

    /**
     * 删除状态
     */
    @MongoIndex
    private Integer del = DelEnum.UN_DEL.getCode();


}
